<template>
	<b-layout-index>

		
		<navbar :title="$t('卡包')"></navbar>
		<view class="mg-10">

			<block v-for="(item,index) in datalist">

				<shop-card-mypay @action="bindAction" :item="item"></shop-card-mypay>
			</block>

		</view>
		<view class="mg-20 bgbb br-rd-10">

			<u-cell url="./edit" :border="false" icon="plus-circle-fill">
				<view class="title pd-right-5 pd-left-5 font-size-16" slot="title">{{$t('添加银行卡')}}</view>
			</u-cell>
		</view>


	</b-layout-index>
</template>

<script>
	//getByBanksMyList
	import {
		getByBanksMyList
	} from "@/api/bank.js"
	export default {
		data() {
			return {
				datalist: []
			}
		},
		onLoad: function() {
	
		},
		onShow:function(){
				this.getData()	
		},
		methods: {
			getData: function() {
				var the = this;
				getByBanksMyList().then(res => {
					console.log(res)
					the.datalist = res
				})
			},
			bindAction(item) {
				// url="./edit"
				//this.getData()
				console.log("Log",item)
				uni.navigateTo({
					url:"./show?id="+item.id
				})
			}
		}
	}
</script>

<style>
	page {
		background-color: #eee !important;
		color: #14313f !important;
	

	}

	.bgbb {
		background-color: #fff !important;
	}
</style>
